raar.process
Class RASpecialProcess

java.lang.Object
  extended byraar.process.RAProcess
      extended byraar.process.RASpecialProcess
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RADebuggerProcess, RAInhibitProcess, RASuppressProcess

public abstract class RASpecialProcess
extends RAProcess

RASpecialProcess is a process that executes and sends it's data before regular processes (RAProcess) are allowed to do so. It is abstract, since these processes must have a very well-defined run() method!

See Also:
Serialized Form

Field Summary
 
Fields inherited from class raar.process.RAProcess
hasRun, inregister, outregister, register, sourceCode, statement
 
Constructor Summary
RASpecialProcess()
           
RASpecialProcess(RARegister register, RAStatement statement, RASetRegister inregister, RAFetchRegister outregister)
          Construct an RASpecialProcess with register, statement(set), input and output.
 
Method Summary
abstract  java.lang.Object clone()
          Clone the process.
 void decreaseBinding()
          For dynamic binding.
 void execute()
          This special process may never just execute; it must be run!
 RADataType getAcceptedDataType()
          For dynamic binding.
 RADataType getDataType(java.lang.String name)
          Necessary for making healthy connections.
 void increaseBinding()
          For dynamic binding.
 boolean isSpecial()
          Use this method to determine whether this process is a special one that should be executed before other processes (i.e. processes with this value on true will ALL be executed before processes with this value on false, and their outputs will be sent to connected inputs, also before the processes with this flag on false start).
 void reset()
          Reset process but keep accepted data type if specified.
abstract  void run()
          Run the process; copy the inputs from the input register to the internal register, execute the process, and copy outputs to the output register.
 void setAcceptedDataType(RADataType dt)
          For dynamic binding.
 void setSourceCode(java.lang.String code)
          Setting the process source code is illegal and will do nothing.
 
Methods inherited from class raar.process.RAProcess
acceptsInput, dumpRegisters, get, getInputNames, getInputObjects, getOutputNames, getOutputObjects, getProcessName, getSourceCode, set, setProcessName, suppliesOutput
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RASpecialProcess

public RASpecialProcess()

RASpecialProcess

public RASpecialProcess(RARegister register,
                        RAStatement statement,
                        RASetRegister inregister,
                        RAFetchRegister outregister)
Construct an RASpecialProcess with register, statement(set), input and output.

Method Detail

setSourceCode

public void setSourceCode(java.lang.String code)
Setting the process source code is illegal and will do nothing.

Overrides:
setSourceCode in class RAProcess

execute

public void execute()
             throws RAException
This special process may never just execute; it must be run!

Overrides:
execute in class RAProcess
Throws:
RAException

run

public abstract void run()
                  throws RAException
Run the process; copy the inputs from the input register to the internal register, execute the process, and copy outputs to the output register.

Overrides:
run in class RAProcess
Throws:
RAException

getDataType

public RADataType getDataType(java.lang.String name)
                       throws RAException
Necessary for making healthy connections. This special process class always returns the accepted datatype for dynamic binding, no matter what string is specified.

Overrides:
getDataType in class RAProcess
Throws:
RAException

isSpecial

public boolean isSpecial()
Use this method to determine whether this process is a special one that should be executed before other processes (i.e. processes with this value on true will ALL be executed before processes with this value on false, and their outputs will be sent to connected inputs, also before the processes with this flag on false start). This is particularly useful for SUPPRESS and INHIBIT.

This process class is a special one that therefore will return true.

Overrides:
isSpecial in class RAProcess

setAcceptedDataType

public void setAcceptedDataType(RADataType dt)
For dynamic binding. Specify which datatype this process will accept.


getAcceptedDataType

public RADataType getAcceptedDataType()
For dynamic binding. Retrieve which datatype this process will accept.


increaseBinding

public void increaseBinding()
For dynamic binding. Called when a connection to the process is established.


decreaseBinding

public void decreaseBinding()
For dynamic binding. Called when a connection to the process is broken.


clone

public abstract java.lang.Object clone()
Description copied from class: RAProcess
Clone the process.

Overrides:
clone in class RAProcess

reset

public void reset()
           throws RAException
Reset process but keep accepted data type if specified.

Overrides:
reset in class RAProcess
Throws:
RAException